<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>String包装类</title>
  </head>

  <body>

  </body>
  <script>
    /* 
    String包装类 
      1.基本包装类型：基本数据类型转换为复杂数据类型步骤
      2.JS中基本包装类型会有：String(),Number(),Boolean()
    */
    var str = "andy";
    console.log(str); //andy
    console.log(str.length); //4

    //相当于干了
    var temp = new String("andy");
    console.log(temp.length);
    var str = temp;
    temp = null;
  </script>

</html>